<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta content="IE=edge" http-equiv="X-UA-Compatible">
    <meta content="width=device-width,initial-scale=1.0" name="viewport">
    <title>KrScript</title>
    <script>
      window.fileChooserCallback = function (result) {
        if (result.absPath) {
          alert('选中文件：' + result.absPath)
        } else {
          alert('文件已丢失')
        }
      }
      function chooseFile() {
        KrScriptCore.fileChooser('window.fileChooserCallback')
      }

    </script>
</head>
<body>
<button onclick="chooseFile()" type="button">测试文件选择</button>
</body>
<style>
    body {
      padding-top: 100px;
      text-align: center;
    }
    button {
      border: none;
      background: #0094ff;
      color: #fff;
      padding: 1em 3em;
      border-radius: 0.3em;
      outline: none;
    }

</style>
</html>
